import Vue from 'vue'
import Router from 'vue-router'
import About from '../view/aobut.vue'
import Contacts from '../view/contacts.vue'
import Ui_router from '../view/ui_router.vue'
import Alice from '../view/child/alice.vue'
import All_contacts from '../view/child/all_contacts.vue'
import Bob from '../view/child/bob.vue'
import Blog from '../view/child/grandson/blog.vue'
import Fax from '../view/child/grandson/fax.vue'
Vue.use(Router)
const routes = [
    {
      path: "/",
      redirect: "/ui_router"
    },
    {
      path: "/ui_router",
      component: Ui_router
    },
    {
      path: "/contacts",
      component: Contacts,
      redirect: "/contacts/all_contacts",
      children: [
        {
          path: "all_contacts",
          component: All_contacts
        },
        {
          path: "alice",
          component: Alice
        },
        {
          path: "bob",
          component: Bob,
          children: [
            {
              path: "blog",
              component: Blog
            },
            {
              path: "fax",
              component: Fax
            }
          ]
        }
      ]
    },
    {
      path: "/about",
      component: About
    }
]
  
const router = new Router({
    routes
  })
  
export default router